<%@ page pageEncoding='UTF-8'%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:set var="contextPath" value="#request.get('javax.servlet.forward.context_path')" scope="request" />

<!DOCTYPE html>
<html>
<head>
	<jsp:include page="/WEB-INF/content/common/Header.jsp" flush="true"/>
	<style type="text/css">
		.metro {
			background-color: #FFFFFF;
		}
	</style>
	<script>
		$( document ).ready(function() {
			if($("#btn-printstock").length > 0) {
				$("#btn-printstock").click(function() {  
					window.print();  
					return false;  
				});
			}
		});
	</script>
</head>
<body class="metro lists">
	<h1 class="fg-orange place-left">
		Drugs
		<small class="on-left-more">
				achieve minimum
		</small>
		<button id="btn-printstock" class="large"><i class="icon-printer no-print"></i>Print</button>
	</h1>
	<br clear="all"/>
	<s:if test="%{existGuiDrugList}">
		<div>
			<span class="place-right">
				Total Stock
			</span>
			<br clear="all"/>
		</div>
		<div id="drug-list-container" class="list-container">
			<div class="listview-outlook">
				<s:iterator var="oGuiDrug" value="%{guiDrugList}">
					<div class="list">
						<div class="list-content">
							<span class="place-left">
								<span class="list-title">${oGuiDrug.name}</span>
	                           	<span class="list-subtitle">Minimum Amount: ${oGuiDrug.minimum}</span>
	      						<span class="list-remark">${oGuiDrug.weight}mg</span>
							</span>
							<span class="list-meta place-right">
	                        	<span class="list-title">
			                		<span class="list-meta-block fg-white bg-green">
			                			${oGuiDrug.totalStockCount}
			                		</span>
		                		</span>
	                        </span>
	                        <br clear="all"/>
						</div>
					</div>
				</s:iterator>
			</div>
		</div>
	</s:if>
	<s:else>
		<h2>no records</h2>
	</s:else>
</body>
</html>